package com.gitee.controller;

import com.gitee.service.IHomeService;
import com.gitee.vo.CoreDataVo;
import com.gitee.vo.ResponseVo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * 首页
 */
@RestController
@RequestMapping("/home")
public class HomeController {

    @Autowired
    private IHomeService homeService;

    @GetMapping("/coreData")
    public ResponseVo<CoreDataVo> coreData() {
        CoreDataVo coreDataVo = homeService.getCoreDataVo();
        return ResponseVo.ok(coreDataVo);
    }
}
